#ifndef VBOINDEXER_H
#define VBOINDEXER_H

#include <QtOpenGL>
#include <map>
#include <vector>
#include "commontypes.h"
using namespace std;

class VBOindexer
{
public:
    VBOindexer();

    void indexVBO (std::vector<vec3> &in_vertices,
                   std::vector<vec3> &in_normals,
                   std::vector<unsigned short> &out_indices,
                   std::vector<vec3> &out_vertices,
                   std::vector<vec3> &out_normals);

    void indexVBOwuv (std::vector<vec3> &in_vertices,
                      std::vector<vec2> &in_uvs,
                   std::vector<vec3> &in_normals,
                   std::vector<unsigned short> &out_indices,
                   std::vector<vec3> &out_vertices,
                   std::vector<vec2> &out_uvs,
                   std::vector<vec3> &out_normals);

    bool CALCULATENORMALS;
    void CalculateNormals();
};

#endif // VBOINDEXER_H
